package collection;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class SortPoint {
    public static void main(String[] args) {
        List<Point> points = new ArrayList<>();
        points.add(new Point(12,33));
        points.add(new Point(15,33));
        points.add(new Point(102,33));
        points.add(new Point(132,33));
        points.add(new Point(19,33));
        Collections.sort(points,((o1, o2) -> o1.getX()- o2.getX()));
        System.out.println(points);



    }
}
